# Fira Code字体安装
wget https://files.cnblogs.com/files/hellohhy/fonts.tar.gz && tar -xzvf fonts.tar.gz && rm fonts.tar.gz
rm ~/.local/share/fonts -rf && mkdir -p ~/.local/share/fonts && mv fonts/*.ttf ~/.local/share/fonts/ && fc-cache
# sublime安装
wget https://files.cnblogs.com/files/rui-4825/linux_sublime_text_3_build_3211_x32.001.7z https://files.cnblogs.com/files/rui-4825/linux_sublime_text_3_build_3211_x32.002.7z https://files.cnblogs.com/files/rui-4825/linux_sublime_text_3_build_3211_x32.003.7z
j=0; for i in *.7z; do let j=j+1; mv $i ${i%.0*}.7z.00$j; done
7z x linux_sublime_text_3_build_3211_x32.7z.001
tar jxvf sublime_text_3_build_3211_x32.tar.bz2
rm linux_sublime_text_3_build_3211_x32.7z.00* sublime_text_3_build_3211_x32.tar.bz2 linux_sublime_text_3_build_3211_x32.001.7z -f
# 配置文件
cd .config
if [ "$@" == "soda" ] ; then 
	wget https://files.cnblogs.com/files/soda-ma/sublime-text-3.tar.gz
elif [ "$@" == "hhy" ] ; then
	echo "hhy"
	git clone
 else
	wget https://files.cnblogs.com/files/hellohhy/sublime-text-3.tar.gz
fi
tar -xzvf sublime-text-3.tar.gz && rm sublime-text-3.tar.gz -f
cd ~
grep -q "alias code=\"~/sublime_text_3/sublime_text" ~/.bashrc; if [ $? -eq 1 ] ; then sed -i '1i\alias code=\"~/sublime_text_3/sublime_text\"'  ~/.bashrc ;fi
grep -q -e "^force_color_prompt=yes" ~/.bashrc; if [ $? -eq 1 ] ; then sed -i '1i\force_color_prompt=yes\n'  ~/.bashrc ;fi
~/sublime_text_3/sublime_text && notify-send "successful" && exit 
exit
